﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SeleccionarAlerta.aspx.cs" Inherits="Modulos_SEA_SeleccionarAlerta" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/estilos.css" rel="stylesheet" />
    <script type="text/javascript" src="../../js/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="../../js/GEN_js.js"></script>
    <link href="../../css/colorbox/colorbox.css" rel="stylesheet" />
    <link href="../../css/estilos.css" rel="stylesheet" />
    <script type="text/javascript" src="../../js/colorbox/jquery.colorbox.js"></script>

    <script type="text/javascript">
        function Validar() {
            var cantidad = $('#txtNombre').val().length;
            if (cantidad < 3) {
                $('#txtNombre').removeClass("txt-box-campos").addClass("txt-box-campos-oblig-cb");
                $("#dvAlerta2").html('La cantidad minima de caracteres es: 3');
                $("#dvAlerta2").css("display", "block");
                $("#fijo").css("height", "50px");
                return false;
            } else {
                $('#txtNombre').removeClass("txt-box-campos-oblig-cb").addClass("txt-box-campos");
                $("#dvAlerta2").css("display", "none");
                $("#fijo").css("height", "50px");
                return true;
            }
        }

        function Aceptar() {
            window.parent.location.reload();
        }
    </script>
    <title></title>
</head>
<body>
    <form id="frmSeleccionAlerta" runat="server">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td class="titulo-modal">Búsqueda de Alerta</td>
            </tr>
        </table>
        <div class="div-box-gris-Alerta">
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="50" class="txt-campos-int">Nombre</td>
                    <td align="left">
                        <input name="txtNombre" clientidmode="Static" type="text" runat="server" class="txt-box-campos" id="txtNombre" style="width: 120px;" />
                        <asp:Button ID="btnBuscar" runat="server" Text="Buscar" CssClass="skip" OnClientClick="return Validar();" OnClick="btnBuscar_Click" />
                </tr>
            </table>
        </div>

        <br />

        <table width="98%" border="1" cellspacing="0" cellpadding="0" class="grilla">
            <tr>
                <td colspan="2">
                    <div id="Layer1" class="div-scroll">
                        <table width="100%" border="1" cellspacing="0" cellpadding="0" class="grilla">
                            <asp:Repeater ID="rptAlerta" runat="server" OnItemDataBound="rptAlerta_ItemDataBound">
                                <HeaderTemplate>
                                    <thead>
                                        <tr>
                                            <td class="cab-grilla" style="width: 50%;">&nbsp;</td>
                                        </tr>
                                    </thead>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tbody>
                                        <tr onmouseover="this.style.background='#fbffbf'; this.style.color='#f16e05'" onmouseout="this.style.background='#f4f4f4'; this.style.color='#353535'" <%#Int32.Parse(Eval("RowNumber").ToString())%2==0?"class=\"td-grilla-blanco\"":"class=\"td-grilla-gris\"" %>>
                                            <td style="text-align: justify;">
                                                <asp:CheckBox ID="chkAlerta" ClientIDMode="Static" runat="server" Text='<%#Eval("Nombre")%>' />
                                            </td>
                                        </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </tbody>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                </td>
            </tr>
        </table>

        <br />
        <span>Nro. Registros:      </span>
        <asp:Label ID="lblTotalRegistros" runat="server" Text=""></asp:Label>
        <div class="btn-acciones">
            <table width="100%" align="left" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="center">
                        <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" CssClass="skip" OnClientClick="window.parent.CerrarModal();" OnClick="btnAceptar_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="fijo">
            <div class="alerta2 alerta" style="display: none;" id="dvAlerta2" />
        </div>
    </form>
</body>
</html>
